#include <stdio.h>
#include <string.h>
void* my_memmove(void* s1, void* s2, size_t n)
{
	void* ret = s1;
	if (s1 < s2)
	{
		while (n--)
		{
			*(char*)s1 = *(char*)s2;
			s1 = (char*)s1 + 1;
			s2 = (char*)s2 + 1;
		}
	}
	else
	{
		while (n--)
		{
			*((char*)s1 + n) = *((char*)s2 + n);
		}
	}
	return ret;
}
int main()
{
	char a[20] = "abcdefgh";
	char b[20] = { 0 };
	my_memmove(a, a+2, 5);
	for (int i = 0; i < 20; i++)
	{
		printf("%c", a[i]);
	}
	
	return 0;
}